chatserver = None
def attachServer(chatserver):
	self.chatserver = chatserver

def msg(message):
		print message
		if (self.chatserver != None):
			self.chatserver.msg(message)